# pylint: disable-msg=E1101
"""
@author: Sergiy Tsymbalyuk
"""

import logging

from pylons.i18n import lazy_ugettext as _

from repoze.what.plugins.pylonshq import ControllerProtector
from repoze.what.predicates import has_permission

from chowa.lib.site.crud import FlatCrudController

from hrms.model.worktime import WorkingDayCode
from hrms.lib.base import BaseController, render, Session

log = logging.getLogger(__name__)

@ControllerProtector(has_permission('site.administer.organization'))
class CodesController(FlatCrudController):
    __model__ = WorkingDayCode
    __columns__ = ['abbreviation', 'number', 'description']
    __edit_columns__ = ['abbreviation', 'number', 'description']
    __main_heading__ = _('Working time')
    